package com.group5.onlinegame.service;

import com.group5.onlinegame.entity.Product;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IProductService {
    //获取商品信息
    List<Product> getProductList(@Param(value = "id") Integer id);

    //修改商品信息
    boolean editProduct(@Param(value = "name") String name, @Param(value = "costGolds") Integer costGolds,
                        @Param(value = "costIngots") Integer costIngots, @Param(value = "photo") String photo,
                        @Param(value = "amount") Integer amount, @Param(value = "saleNum") Integer saleNum,
                        @Param(value = "description") String description, @Param(value = "id") Integer id);

    //修改商品状态
    boolean editStatus(@Param(value = "status") String status, @Param(value = "id") Integer id);

    //增加商品
    boolean addProduct(@Param(value = "typeId") Integer typeId, @Param(value = "name") String name,
                       @Param(value = "costGolds") Integer costGolds, @Param(value = "costIngots") Integer costIngots,
                       @Param(value = "amount") Integer amount, @Param(value = "saleNum") Integer saleNum,
                       @Param(value = "photo") String photo, @Param(value = "description") String description,
                       @Param(value = "isNeedAdress") String isNeedAdress, @Param(value = "status") String status,
                       @Param(value = "id") Integer id);
    //批量删除
    Integer deleteMany(String[] ids);

    //导出Excel
    List<Product> getProductExcel(@Param(value = "id") Integer id);
}
